package com.dehui.traders.ui.usercenter;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.dehui.traders.BR;
import com.dehui.traders.R;
import com.dehui.traders.databinding.ActivityUserCenterBinding;
import com.dehui.traders.ui.base.AppActvity;

public class UserCenterActivity extends AppActvity<ActivityUserCenterBinding,UserCenterViewModel> {


    private UserCenterViewModel viewModel;

    public static void start(Context context){
        Intent intent = new Intent(context,UserCenterActivity.class);
        context.startActivity(intent);
    }

    @Override
    public int initContentView() {
        return R.layout.activity_user_center;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public UserCenterViewModel initViewModel() {
        viewModel = new UserCenterViewModel(this);
        return viewModel;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initToolbarValue(R.string.main_tab_system,R.string.account_info);
    }

    @Override
    protected void onResume() {
        super.onResume();
        viewModel.queryUser();
    }
}
